/*
 * GF_C_MODEL_STRING_LIKE_LIST_20240913/GF_C_MODEL_STRING_LIKE_LIST.h
 * Created by GF on 2024/09/13.
 */

#ifndef GF_C_MODEL_STRING_LIKE_LIST_GB2312_H
#define GF_C_MODEL_STRING_LIKE_LIST_GB2312_H

/* ************************************************** */

#define _ARRAY_START_INDEX   0

#define _POINTER_START_INDEX 0

/* ************************************************** */

/*
 * In C Language, The Definition of Global Variables (If They are Shared Across Multiple Files),
 * Usually, It Should be Declared in The '.h' Header File (Using The 'extern' Keyword),
 * And Define It in a '.c' File (i.e. do not Provide The 'extern' Keyword and Provide an Initial Value).
 */

extern char _EMPTY_VALUE[7];

extern char _LIST_SYMBOL_HEAD[2];
extern char _LIST_SYMBOL_TAIL[2];
extern char _LIST_SYMBOL_BLANK[2];
extern char _LIST_SYMBOL_DELIMITER[2];

/* ************************************************** */

void FREE_CHAR_POINTER_MEMORY(char* CHAR_POINTER);

/* ************************************************** */

int STRING_SPECIFIED_CHAR_COUNT(char*, char);
char* STRING_DEL_SPECIFIED_CHAR_ALL(char*, char);
char* STRING_DEL_CHAR_BY_INDEX(char*, int);
char* STRING_TOKENS_REVERSE(char*, char*);
char* STRING_TOKENS_REVERSE_BY_STRING(char*, char*);

/* ************************************************** */

/* String_Like List: Append Element */
char* STRING_LIKE_LIST_APPEND_ELEMENT(char*, char*);

/* String_Like List: Extract Element by Index */
char* STRING_LIKE_LIST_EXTRACT_ELEMENT_BY_INDEX(char*, int);

/* String_Like List: Replace Value by Index */
char* STRING_LIKE_LIST_REPLACE_VALUE_BY_INDEX(char*, int, char*);

#endif // GF_C_MODEL_STRING_LIKE_LIST_H
